<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%-- Centered Layout Tiles (after user login)
  This layout create a html page with <header> and <body> tags. It
  render a header, menu title, left tile, right tile, body tile and footer.
  @param header Header tile (jsp url or definition name)
  @param right Right tile (optional)
  @param body Body or center tile
  @param left Left tile (optional)
  @param footer Footer tile
  @param error Error tile
--%>
<tiles:importAttribute name="header" ignore="true"/>
<tiles:importAttribute name="menu" ignore="true"/>
<tiles:importAttribute name="left" ignore="true"/>
<tiles:importAttribute name="body" ignore="true"/>
<tiles:importAttribute name="right" ignore="true"/>
<tiles:importAttribute name="error" ignore="true"/>
<tiles:importAttribute name="footer" ignore="true"/>

<HTML>
  <HEAD>
    <link rel=stylesheet href="<%=request.getContextPath()%>/style/main.css" type="text/css">
    <title><tiles:getAsString name="title"/></title>
  </HEAD>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">

<table width="780" border="0" cellspacing="0" cellpadding="0" align="left">
  <tr>
    <td colspan="2"><tiles:insert attribute="header" /></td>
  </tr>
  <tr>
    <td colspan="2"><tiles:insert attribute="menu" /></td>
  </tr>
  
  <tr>
    <logic:present name="left">
    <td width="186" valign="top" bgcolor="#FFFFFF"
	       background="<%=request.getContextPath()%>/images/left_bg.gif">
      <tiles:insert attribute="left" ignore="true"/>
    </td>
    <td valign="top" width="620" >
    </logic:present>
    <logic:notPresent name="left">
    <td valign="top" width="780">
    </logic:notPresent>

      <table border="0" width="100%" cellspacing="5">
        <logic:present name="error">
        <logic:notEmpty name="error">
        <tr>
          <td colspan="2"><tiles:insert attribute="error" /></td>
        </tr>
        </logic:notEmpty>
        </logic:present>

        <tr>
          <logic:present name="body">
          <td><tiles:insert attribute="body" /></td>
          </logic:present>

          <logic:present name="right">
          <td valign="top"  align="left">
            <tiles:insert attribute="right" ignore="true"/>
          </td>
          </logic:present>
        </tr>
      </table>
    </td>
  </tr>

  <tr>
    <td align="center" colspan="2" height="56" 
        background="<%=request.getContextPath()%>/images/button_bg_wide.gif">
      <tiles:insert attribute="footer" />
    </td>
  </tr>
</table>

</body>
</html>

